<template>
  <div id="app">
    <hr />
    <vue-scroll style="height:100px;overflow:hidden">
      <ul>
        <li v-for="(item, index) in msgList" :key="index">
          {{ item }}
        </li>
      </ul>
    </vue-scroll>
    <hr />
    <button @click="openModal" style="margin-bottom:30px">打开模态框</button>
  </div>
</template>

<script>
import MsgModal from './components/msg-list.vue'
export default {
  name: 'App',
  data() {
    return {
      msgList: [1, 22, 33, 44, 55, 99, 88, 55, 8526, 4120],
    }
  },
  methods: {
    openModal() {
      this.$openModal(MsgModal, {
        propsData: {
          msgList: this.msgList,
        },
      })
    },
  },
}
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
</style>
